package com.link.base.base.competitor.model;

import com.link.core.basic.model.BasicModel;
import com.link.core.util.LovUtil;
import com.link.core.util.StringUtils;

/**
 * 竞争对手信息
 *
 * @author 王昊
 * @date 2020-09-16 17:22:04
 */
public class Competitor extends BasicModel {

    /**
    *  竞争对手名称
    */
    private String competitorName;
    /**
    *  竞争对手联系方式
    */
    private String competitorTel;
    /**
    *  成立日期
    */
    private String establishDate;
    /**
    *  公司类型
    */
    private String companyType;
    /**
    *  人员规模
    */
    private String personnelSize;
    /**
    *  信用等级
    */
    private String creditRating;
    /**
    *  注册地址
    */
    private String registAddr;
    /**
    *  备注（公司背景）
    */
    private String compRemark;

    /**
     *  创建者名称
     */
    private String firstName;

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getCompetitorName() {
        return competitorName;
    }

    public void setCompetitorName(String competitorName) {
        this.competitorName = competitorName;
    }

    public String getCompetitorTel() {
        return competitorTel;
    }

    public void setCompetitorTel(String competitorTel) {
        this.competitorTel = competitorTel;
    }

    public String getEstablishDate() {
        return establishDate;
    }

    public void setEstablishDate(String establishDate) {
        this.establishDate = establishDate;
    }

    public String getCompanyType() {
        return companyType;
    }

    public void setCompanyType(String companyType) {
        this.companyType = companyType;
    }

    public String getPersonnelSize() {
        return personnelSize;
    }

    public void setPersonnelSize(String personnelSize) {
        this.personnelSize = personnelSize;
    }

    public String getCreditRating() {
        return creditRating;
    }

    public void setCreditRating(String creditRating) {
        this.creditRating = creditRating;
    }

    public String getRegistAddr() {
        return registAddr;
    }

    public void setRegistAddr(String registAddr) {
        this.registAddr = registAddr;
    }

    public String getCompRemark() {
        return compRemark;
    }

    public void setCompRemark(String compRemark) {
        this.compRemark = compRemark;
    }

    private Long accntId;
    private String acctCode;
    private String acctName;

    private String partType;

    private String partTypeName;

    public String getPartTypeName() {
        String ts = null;
        StringBuilder rs = new StringBuilder();
        try {
            if (!StringUtils.isNull(this.getPartType())) {
                String partTypeTemp = this.getPartType().replace("[", "").replace("]", "").replace("\"", "");
                if (!StringUtils.isNull(partTypeTemp)) {
                    String[] array = partTypeTemp.split(",");
                    for (String s : array) {
                        rs.append(" ").append(LovUtil.getLovName("LNK_ESTIMATED_PARTS_TYPE", s));
                    }
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        if (!StringUtils.isNull(rs.toString())) {
            ts = rs.substring(1);
        }
        return ts;
    }

    public void setPartTypeName(String partTypeName) {
        this.partTypeName = partTypeName;
    }

    public Long getAccntId() {
        return accntId;
    }

    public void setAccntId(Long accntId) {
        this.accntId = accntId;
    }

    public String getAcctCode() {
        return acctCode;
    }

    public void setAcctCode(String acctCode) {
        this.acctCode = acctCode;
    }

    public String getAcctName() {
        return acctName;
    }

    public void setAcctName(String acctName) {
        this.acctName = acctName;
    }

    public String getPartType() {
        return partType;
    }

    public void setPartType(String partType) {
        this.partType = partType;
    }
}
